package com.liukai.todo_android.common.utils;

import java.util.regex.Pattern;

/**
 * @author ：liukai
 * @date ：Created in 2021/8/8 3:39 下午
 * @description：邮箱格式校验
 * @modified By：
 * @version: $
 */
public class EmailFormat {

    public static boolean isValidEmail(String email) {
        if ((email != null) && (!email.isEmpty())) {
            return Pattern.matches("^(\\w+([-.][A-Za-z0-9]+)*){3,18}@\\w+([-.][A-Za-z0-9]+)*\\.\\w+([-.][A-Za-z0-9]+)*$", email);
        }
        return false;
    }

}
